Optimal. Leaf size=35 \[ x (a C+b B)+\frac{a B \tanh ^{-1}(\sin (c+d x))}{d}+\frac{b C \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15909, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.132, Rules used = {3029, 2968, 3023, 2735, 3770} \[ x (a C+b B)+\frac{a B \tanh ^{-1}(\sin (c+d x))}{d}+\frac{b C \sin (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3029
Rule 2968
Rule 3023
Rule 2735
Rule 3770
Rubi steps
\begin{align*} \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx &=\int (a+b \cos (c+d x)) (B+C \cos (c+d x)) \sec (c+d x) \, dx\\ &=\int \left (a B+(b B+a C) \cos (c+d x)+b C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx\\ &=\frac{b C \sin (c+d x)}{d}+\int (a B+(b B+a C) \cos (c+d x)) \sec (c+d x) \, dx\\ &=(b B+a C) x+\frac{b C \sin (c+d x)}{d}+(a B) \int \sec (c+d x) \, dx\\ &=(b B+a C) x+\frac{a B \tanh ^{-1}(\sin (c+d x))}{d}+\frac{b C \sin (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.02509, size = 46, normalized size = 1.31 \[ \frac{a B \tanh ^{-1}(\sin (c+d x))}{d}+a C x+b B x+\frac{b C \sin (c) \cos (d x)}{d}+\frac{b C \cos (c) \sin (d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 56, normalized size = 1.6 \begin{align*} bBx+aCx+{\frac{Ba\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{Bbc}{d}}+{\frac{Cb\sin \left ( dx+c \right ) }{d}}+{\frac{Cac}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.05372, size = 78, normalized size = 2.23 \begin{align*} \frac{2 \,{\left (d x + c\right )} C a + 2 \,{\left (d x + c\right )} B b + B a{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, C b \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.46613, size = 142, normalized size = 4.06 \begin{align*} \frac{2 \,{\left (C a + B b\right )} d x + B a \log \left (\sin \left (d x + c\right ) + 1\right ) - B a \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, C b \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.90246, size = 107, normalized size = 3.06 \begin{align*} \frac{B a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - B a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) +{\left (C a + B b\right )}{\left (d x + c\right )} + \frac{2 \, C b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]